const
  cast_sbox1                : array[0..255] of DWord = (
    $F010C9C1, $B66BF8CA, $5ABC87F7, $FB8A87D8, 
    $5E888B3D, $8A66B036, $E095CD13, $A94B5164, 
    $D798AAF9, $15F43EE2, $6D4A466F, $22452030, 
    $D97AE4F5, $752550CE, $85DD500B, $9AF8C03C, 
    $33E33531, $646DD1FA, $FE4285E7, $B3983D88, 
    $35FBD7AD, $1690EE66, $D6F9C403, $3C12E414, 
    $B2A14869, $39CD1212, $06EB265F, $95613FE0, 
    $16DE4365, $5847E8FE, $0D8308FB, $FC111CEC, 
    $0EA7C4A1, $FFBA5F2A, $690E07D7, $48118738, 
    $73D9081D, $5C5CA096, $4D54FEF3, $EDBECAC4, 
    $836F89D9, $33121942, $36790A4F, $4C2E7390, 
    $950705D5, $66D5752E, $340F85EB, $94BB4D9C, 
    $D0957811, $7564A05A, $087E0DC7, $D7D164E8, 
    $9E671C8D, $972CC6C6, $78967DE3, $CD5A6F49, 
    $6E765472, $6772F23F, $DC27BB40, $AB5C2C45, 
    $71D0F55E, $9A91C6DB, $4642524C, $8C234F81, 
    $7DBF958A, $423197B7, $5AF2D698, $7A2D14FD, 
    $39A460F6, $A1ED40D3, $25AF9424, $0DF8F8B9, 
    $3BECC3A2, $7597DE2F, $0C0816F0, $A784B6B5, 
    $197D698E, $EE58CBCB, $2F312AFC, $86084AF1, 
    $CC5E3EBA, $6407A5A7, $52D0DC48, $79F1F16D, 
    $1DA66F26, $16C847C3, $150A76D4, $2D222629, 
    $FEA866D2, $9CE6CE1F, $83CA86A0, $3D67A525, 
    $FD5DD1BE, $D8F394BB, $5B52D7AC, $A53B6A61, 
    $40139BEA, $941F3797, $7A0675F8, $2EBCB1DD, 
    $B455F156, $18D692B3, $5575AD84, $ECECF799, 
    $5D1C3E02, $699EC20F, $7CAA0A50, $F72BF795, 
    $EC352DEE, $F03121AB, $73B2585C, $E2F3ADD1, 
    $12F2AD1A, $C0D74D87, $746EA3A8, $B7D4564D, 
    $3615E786, $CE0721A3, $E09C3834, $59B06D09, 
    $70FB4932, $A83EB9FF, $7121A200, $A538AE05, 
    $14067E1E, $A620729B, $6E9AAD0C, $BAA81541, 
    $0A4E724A, $90CEE777, $7F246558, $32BFDEBD, 
    $D28951B6, $3088F493, $D56916E4, $3A038679, 
    $F7388862, $5585B5EF, $CCEC4DB0, $CE34C875, 
    $3214C24E, $3910878B, $3F96D5BC, $9A0FA0B1, 
    $A6B9EB7A, $52E50567, $2082BB08, $2B464B2D, 
    $E0932FE6, $FECB0B83, $28074994, $7EBD43E9, 
    $8006FB92, $8E72B5DF, $9D050D60, $1F0746E5, 
    $C2E2FA7E, $A390607B, $8771D26C, $51215021, 
    $540818AA, $EE38A757, $D824A4B8, $0B6E9B9D, 
    $0E568216, $AB7C6673, $51E1D044, $B2F4A559, 
    $9ED9A2C2, $8044B9CF, $3FA6E110, $DAD72955, 
    $323426AE, $8C6EFD6B, $4436A31C, $82142391, 
    $994BF9DA, $D228CD47, $CEE52268, $8B7FD00D, 
    $91364846, $4D8C0563, $6C00AAC9, $1A637DF2, 
    $587AC1BF, $144CC8C0, $4B0B6FC5, $0B0B46DE, 
    $36BB5E5B, $813047CC, $115F1B01, $48D88F0A, 
    $E6547737, $86DF3418, $2200E87D, $55D58276, 
    $9028E853, $CB37D9A4, $B9785439, $1C978D22, 
    $34D3CDAF, $2BB1C470, $2F4B1A35, $27AB5B0E, 
    $71C4834B, $06E9C07C, $95B93671, $B040D83A, 
    $7A9AA527, $8B6DD9C8, $73B8E4ED, $301730A6, 
    $A2C20F43, $D7C95C54, $9532A1A9, $62A8D052, 
    $134EDD9F, $F7D0D420, $2D7D28A5, $E197633E, 
    $89196C3B, $0B2E0D2C, $C81975E1, $C857D56A, 
    $371A5717, $212C1378, $C3AEC55D, $0B1E52D6, 
    $29067A33, $95C33304, $53469319, $6D0A4782, 
    $C22AF18F, $FBE4F7D0, $41C89B15, $41925F6E, 
    $3489192B, $E1082DDC, $F3B6D951, $6530869A, 
    $0C328D07, $F5F4E128, $632989CD, $194DE906, 
    $2AE52923, $68D05DB4, $120B2889, $AF6EF2B2, 
    $CFE7097F, $7C692F80, $2E947185, $2F9F4F9E, 
    $88228A1B, $A8C3228C, $660860C1, $661DEBCA);

  cast_sbox2                : array[0..255] of DWord = (
    $5DE78775, $230E7D4E, $8A5D2E8B, $943218BC, 
    $67A3EFB1, $9B5B767A, $BDB8BC67, $19014E08, 
    $E18B2A2D, $EAE78AE6, $895CD283, $3F7C2C94, 
    $5111B2E9, $9CE92692, $15098CDF, $BCD34060, 
    $A85A45E5, $34FDF57E, $9F83477B, $EA4C556C, 
    $CED6E3AA, $4CEE9E57, $3D0E77B8, $2CCBBA9D, 
    $B1241D16, $B56C6D73, $7F2DF344, $EF7D5459, 
    $BFC10DC2, $CFF5D0CF, $D5F85410, $61BA6855, 
    $F92061AE, $1578246B, $E180661C, $B510F291, 
    $6AF804DA, $F8310447, $816A3568, $3DE52F0D, 
    $4A2D2346, $0B4A4C63, $0AF70DF4, $B1AD99C9, 
    $1A0028F2, $76B618BF, $FC517BC0, $D76EEEC5, 
    $0E78C1DE, $934AC55B, $79194ACC, $26782A01, 
    $1611DA0A, $CB1EEE37, $1C2F8718, $0F5E877D, 
    $36A59D76, $1A256F53, $EAC27CA4, $EB398339, 
    $29997822, $CB0964AF, $7499B770, $CD1ED935, 
    $634A160E, $4C4A2A4B, $6DA2037C, $B1DE8571, 
    $F1B7633A, $39975C27, $4CB96CC8, $C9FEC3ED, 
    $DE708BA6, $F56CD643, $BBBB3F54, $D9F810A9, 
    $FFBFFB52, $6EEEB49F, $E4CC0720, $ECB127A5, 
    $65175E3E, $F005533B, $E8E5902C, $D43B04E1, 
    $CABBA06A, $0FB94E17, $0BA2E678, $34CCE45D, 
    $C0B0EDD6, $24CF8133, $604C5604, $16004219, 
    $70E6B282, $D4A5088F, $04236AD0, $364CDA15, 
    $30A39A6E, $9A4B402B, $31EEF0DC, $9CC4A851, 
    $4931919A, $61E3C407, $BAC6F428, $250FE8CD, 
    $A3C9C406, $943C7023, $B020C0B4, $44C09DB2, 
    $2EAB607F, $4B1AE280, $7058F085, $C1F1CA9E, 
    $C32AF11B, $5D09258C, $1CF26FC1, $206C36CA, 
    $7CB5BDF7, $D54095D8, $EE4ED13D, $C55E0E36, 
    $83E2A313, $28237F64, $398990F9, $6640BCE2, 
    $5FC0BC6F, $A36D6E30, $977C6AF5, $2444EECE, 
    $2EF3660B, $FBBF2E3C, $D87B5B31, $3EFE8FFA, 
    $D50E3BE7, $9F6ACB88, $D2509DAD, $0A50CC66, 
    $78311A03, $9A7F9214, $0478AE69, $139A1012, 
    $EAE41C5F, $18160DE0, $4E9E4965, $A22006FE, 
    $DE339EFB, $CCDC0AEC, $35566AA1, $FEBB9D2A, 
    $F80C3DD7, $D6E09538, $711C4E1D, $2EC4FE96, 
    $29D6D4F3, $DE9FF8C4, $C38D6FD9, $0E3F9742, 
    $E354804F, $854FC190, $4EE58BD5, $F546132E, 
    $FDBA9BEB, $6C6ABB9C, $EBBA9E11, $54B65E5A, 
    $7B0EC3C7, $627CF2E8, $38F8E28D, $F61DA4C6, 
    $75C2D3E3, $812FB374, $621ED549, $CAE45272, 
    $DC90E83F, $48958940, $D7B93245, $76BA135E, 
    $D6975CDB, $03B6404C, $761EF581, $EBB4CDB7, 
    $D66D5AFD, $5AFDBEF6, $4D2416D3, $7419C224, 
    $C5C3DEB9, $A17B41A2, $DA58542F, $F0A264F0, 
    $1EC03CB5, $4EBF078E, $BE18E1CB, $F94998FC, 
    $813A70F1, $BFF0FCBA, $BFDD5BA7, $FFD56A48, 
    $A440B76D, $BF484D26, $A5699DC3, $BE8924D4, 
    $3E538C29, $FD3764D2, $40A9C41F, $ED7154A0, 
    $BFE1AB25, $A4D7EFBE, $05CE2ABB, $A0EFC5AC, 
    $5C041061, $7796D9EA, $45A76D97, $DD8783F8, 
    $1B79F7DD, $1C204F56, $684268B3, $2CE8DB84, 
    $F5E4DD99, $8C8BBC02, $C3C4380F, $403D5850, 
    $2D447D95, $CFC7CBEE, $EB8637AB, $EBB3C65C, 
    $67B2D3D1, $6A466B1A, $93720387, $074C31A8, 
    $43601C4D, $31E8C586, $639D77A3, $60CED309, 
    $712B4732, $5826AFFF, $2B817000, $1F4FB405, 
    $85919C1E, $8950089B, $17E09B0C, $87BDBB41, 
    $6552B04A, $77DC1D77, $823E7358, $217A24BD, 
    $B844AFB6, $39A9CA93, $A16544E4, $ADA86C79, 
    $70090662, $22902BEF, $E2F89BB0, $04AA4E75, 
    $0B78604E, $C57A9D8B, $610143BC, $91DBC6B1);

  cast_sbox3                : array[0..255] of DWord = (
    $99E5ACC6, $0CCAFBE3, $E8F87B74, $302ABD49, 
    $34BFDA72, $5FFA903F, $9445D140, $774A9A45, 
    $CE311B5E, $2C0A84DB, $4F96084C, $949DDD81, 
    $495C5B8A, $425975B7, $DA322C98, $4EC1C2FD, 
    $7A43C6F6, $45A23ED3, $9B308A24, $8855C6B9, 
    $E9F4C9A2, $2ED7FC2F, $A9C0ACF0, $9977A4B5, 
    $85F40F8E, $6A4209CB, $CEB760FC, $877F58F1, 
    $A6E984BA, $A8D803A7, $0B5AB248, $D6FB1F6D, 
    $1A8C5526, $C1DDC5C3, $716DECD4, $F3EB7429, 
    $1CCEECD2, $40BF6C1F, $587D9CA0, $6C3F1325, 
    $6C4AF7BE, $7B2D52BB, $3C6B8DAC, $788EF861, 
    $E5ED61EA, $4B781597, $D13ACBF8, $8F1A5FDD, 
    $53E25756, $CB2C90B3, $181BA384, $FD02C599, 
    $5BC14402, $A9EFE00F, $81B7A050, $C1C7E595, 
    $B7F8D3EE, $FC9B5FAB, $69BD8E5C, $2903BBD1, 
    $287AF31A, $A098AB87, $77AD79A8, $DE66844D, 
    $C6A8CD86, $8F7D9FA3, $B0E4AE34, $77F2BB09, 
    $A87ECF32, $BEE857FF, $47E9B800, $B2791C05, 
    $FF00A41E, $689B309B, $74F8630C, $DC54A341, 
    $1BE5384A, $D6D8C577, $E3CDBB58, $2A668CBD, 
    $0A82B7B6, $10FFF293, $82B40CE4, $F3525479, 
    $A7FA8E62, $0467D3EF, $BECEE3B0, $0CF9B675, 
    $66A5684E, $057BC58B, $79A70BBC, $C838AEB1, 
    $28BF317A, $C5176367, $43F69108, $46E1792D, 
    $DE5315E6, $16228983, $A9B4BF94, $27F891E9, 
    $D2678192, $1F6D53DF, $9B622360, $C630B4E5, 
    $D36A207E, $D5CC1E7B, $4094886C, $84A6DE21, 
    $A2DBDEAA, $DA738557, $BFC2FAB8, $E5DE499D, 
    $583CE816, $19946473, $C751C644, $68FC7359, 
    $A338A8C2, $C537D7CF, $E3DE7710, $69451755, 
    $1911CCAE, $885B3B6B, $EFCBD91C, $7BD63191, 
    $F94E3FDA, $0E4C2B47, $280DF868, $07A3FE0D, 
    $15A32E46, $3A448363, $B23620F4, $13B4F8C9, 
    $C92103F2, $AB465FBF, $9FBEDEC0, $879DDDC5, 
    $2A9F6CDE, $68381C5B, $BA97FDCC, $5A3DA901, 
    $E669550A, $D0405537, $A6F28A18, $6AB9967D, 
    $6B28E876, $2B61E653, $264CCFA4, $FFB92239, 
    $56139322, $7757EBAF, $87BE5A70, $28E20835, 
    $4A56010E, $4CB1C14B, $9183F67C, $7E944471, 
    $9FC01E3A, $F82F0327, $6FCBAFC8, $FBE612ED, 
    $94B116A6, $245B8D43, $74C0D254, $EEDFEFA9, 
    $EF435652, $AF6B7B9F, $B5D7EA20, $3AF896A5, 
    $39B8893E, $89572A3B, $D25AC32C, $69D103E1, 
    $06259B6A, $B6373517, $6F346978, $4630735D, 
    $E55EB8D6, $D0E07833, $33FD2904, $FD406119, 
    $FD234D82, $A9C00F8F, $55468DD0, $698A056E, 
    $DDF7572B, $F82763DC, $2F2AE751, $D5ACCC9A, 
    $82B7EB07, $FB07B728, $E2DFB7CD, $F794CF06, 
    $40DFA723, $EFACD3B4, $11317689, $DB6678B2, 
    $7CD4A77F, $52854580, $8878DF85, $29CD759E, 
    $66A1481B, $4B34D88C, $E418EEC1, $D5A8B1CA, 
    $0E5024F7, $826098D8, $E97AE03D, $DCF65936, 
    $D8881A13, $D8BAD264, $4B4A2FF9, $08FFD7E2, 
    $EF68436F, $0B4F1130, $0EF099F5, $D9C5D9CE, 
    $8BA3FD0B, $910E213C, $10521A31, $08AC4AFA, 
    $31DEE2E7, $3D9A0E88, $5FC8ECAD, $4E665766, 
    $4048D103, $75522514, $76618D69, $58226B12, 
    $6879E35F, $FE9EF0E0, $7C56B865, $17F631FE, 
    $F18E75FB, $BC7E3DEC, $1DCD69A1, $DC8A982A, 
    $DE8324D7, $DE4F1838, $A9D0DD1D, $DC07C996, 
    $54D0CBF3, $50DDCBC4, $778E8ED9, $1E413242, 
    $DF48874F, $7CAFE490, $CDD23AD5, $F2217E2E, 
    $692FB2EB, $9D902E9C, $C8C1DD11, $5A56995A, 
    $0D9BEAC7, $3F5AB5E8, $F9D9B18D, $1D3DAFC6);

  cast_sbox4                : array[0..255] of DWord = (
    $9FC93734, $410D6809, $BF383032, $CE8B3CFF, 
    $BC2C3100, $06297905, $7966751E, $D45C459B, 
    $C691CC0C, $D677B041, $7948794A, $DF4D0A77, 
    $29A71458, $618949BD, $EFA468B6, $71EC6793, 
    $FBA655E4, $85B1C179, $200BAF62, $39C178EF, 
    $2AA31CB0, $5D82D375, $9446F94E, $C0679A8B, 
    $621634BC, $EB887BB1, $6702327A, $90EA6867, 
    $35A9AA08, $2044F62D, $51B886E6, $2D61BE83, 
    $5D44C894, $366CBEE9, $69E06292, $70CDB8DF, 
    $0E581C60, $A16291E5, $B957717E, $3932B37B, 
    $BE69716C, $09F36B21, $1E0E9FAA, $75F54A57, 
    $DADFD3B8, $1552869D, $1CF61916, $F6765973, 
    $420F8F44, $F2556059, $942949C2, $94EEFCCF, 
    $89863010, $E8EFB455, $785ADDAE, $998C906B, 
    $5D96821C, $67EF7E91, $0980C0DA, $71CCB047, 
    $86249168, $4CF8FB0D, $2AC01F46, $18193863, 
    $5CB1A9F4, $62C2A5C9, $C99964F2, $C7A444BF, 
    $BFA857C0, $51913AC5, $80543DDE, $D884315B, 
    $CEE866CC, $7DF3B601, $DFAB960A, $E00F9A37, 
    $FD92E318, $91BF537D, $0BB99976, $71795B53, 
    $451618A4, $AB4B8F39, $9823B422, $1AAC90AF, 
    $85799370, $6EEE2535, $CF86920E, $7968964B, 
    $5EEA1F7C, $76B71171, $D2221F3A, $849D0827, 
    $1085C8C8, $DC6C8FED, $37C587A6, $6605C243, 
    $2867DB54, $D9C71CA9, $20FB3752, $8006E09F, 
    $10F4E320, $BAED73A5, $E374DA3E, $7BC8BF3B, 
    $C766AC2C, $9F3090E1, $BDB75C6A, $7B93FA17, 
    $47984278, $C407B05D, $3E06E9D6, $CD6D6D33, 
    $7911F204, $564C4E19, $4892EE82, $B9F2348F, 
    $A95546D0, $05B62615, $E8E2166E, $4B73AC2B, 
    $DF690CDC, $D6973451, $5A7E4D9A, $29537007, 
    $94A55028, $EDD7B4CD, $F4E0C006, $E39F5C23, 
    $9EBF5CB4, $53322389, $E69DD9B2, $4AED8C7F, 
    $5715BE80, $E5AF3C85, $EBD1469E, $B0785D1B, 
    $4B3C418C, $FE61FBC1, $6BC9F2CA, $2A7A69F7, 
    $7D639D3D, $A9F60A36, $38CA8F13, $A65B1B64, 
    $3D0F9CF9, $F60EF8E2, $65B7E86F, $93F14A30, 
    $277FB6F5, $07856ACE, $BF25D20B, $2C6B4A3C, 
    $6A47E731, $F02D4BFA, $43E7E7E7, $665B2788, 
    $847269AD, $5229C866, $A15E0603, $F2102E14, 
    $2ABBBA69, $C5194C12, $DD50485F, $FAE2E9E0, 
    $3E0E9565, $968182FE, $C80B0AFB, $D1C126EC, 
    $503FF6A1, $517B592A, $52BAE9D7, $0CF9F138, 
    $730B1A1D, $B99EFA96, $2608C0F3, $E94994C4, 
    $4D4D7BD9, $252FD342, $14F5AC4F, $F8259D90, 
    $B282D7D5, $62888F2E, $47F707EB, $6748D79C, 
    $38812A11, $94C71A5A, $3C526FC7, $6D7F4EE8, 
    $8774AE8D, $B3B8A0C6, $F3B9BFE3, $A8B24F74, 
    $601BE149, $9B058E72, $F027143F, $79346540, 
    $94437E45, $D49D8F5E, $D7F8C8DB, $A64D5C4C, 
    $6D828181, $8A638F8A, $DE4D79B7, $D8064098, 
    $3E3626FD, $4B19BAF6, $4BA002D3, $B2355E24, 
    $18BDEAB9, $8E8D7DA2, $C2A3802F, $9CCA40F0, 
    $E8F788B5, $2503838E, $1D5F4DCB, $8559B4FC, 
    $6BFAFCF1, $FDE3B8BA, $FE8B07A7, $25E9C648, 
    $C216836D, $F1A54926, $732A89C3, $9CFDC0D4, 
    $970A9829, $7AFAA0D2, $4069F01F, $62E230A0, 
    $1C85F725, $8B3D6BBE, $B9B996BB, $E838E1AC, 
    $52E19C61, $E61A95EA, $3B2A1997, $69C4DFF8, 
    $5C1CC3DD, $B07E4B56, $A40854B3, $C5767784, 
    $D518E999, $1EBFF802, $6DB9640F, $5CB73450, 
    $7115C995, $6E0E47EE, $3AD6A3AB, $4FF5E25C, 
    $536D5FD1, $951B271A, $FA89AF87, $9F728DA8, 
    $E38FE84D, $5807C186, $FC2863A3, $FD4A8234);

  cast_sbox5                : array[0..255] of DWord = (
    $BBBECB1B, $4454678C, $7F72B9C1, $8315A8CA, 
    $58CCF7F7, $EB9CB7D8, $EFA37B3D, $C3AD6036, 
    $F1B73D13, $BCB28164, $ED5C9AF9, $0A87EEE2, 
    $DAECB66F, $88315030, $1FD7D4F5, $40B600CE, 
    $9A70C00B, $8799F03C, $6FC92531, $9FAB81FA, 
    $7536F5E7, $901E6D88, $355AC7AD, $872B9E66, 
    $4CBF3403, $D6AE1414, $3C693869, $8274C212, 
    $68F1965F, $51416FE0, $DAFF3365, $A8AC98FE, 
    $0A3A78FB, $9611B4A1, $C48C0F2A, $DFE677D7, 
    $B40BB738, $107BF81D, $EF4B5096, $BEBE6EF3, 
    $403B79D9, $8ACDC942, $33E37A4F, $A102A390, 
    $25EBF5D5, $C70E252E, $CFEAF5EB, $45C47D9C, 
    $82836811, $1ECA505A, $463A7DC7, $B63F94E8, 
    $474E0C8D, $776F76C6, $BCA3EDE3, $C4FD3574, 
    $BC2A5F49, $D0460472, $E741623F, $4CEFEB40, 
    $98051C45, $ACDDA55E, $CC9136DB, $75FF824C, 
    $87953F81, $A6B9458A, $4DD207B7, $CED50698, 
    $DE5804FD, $D23B10F6, $CF9EB0D3, $07E6C424, 
    $6DCCE8B9, $E2D073A2, $9ECA4E2F, $5BC446F0, 
    $BEF1A6B5, $3A5E198E, $ED7C3BCB, $F0A25AFC, 
    $29FE3AF1, $4FEBEEBA, $848C15A7, $BF270C48, 
    $8860E16D, $19911F26, $851DB7C3, $CA75A6D4, 
    $7CFA1629, $65A016D2, $D67D3E1F, $B57AB6A0, 
    $8E989525, $4F1281BE, $1C3B04BB, $90B55A61, 
    $39354BEA, $5087A797, $81D0A5F8, $166FA1DD, 
    $FE94A156, $5ED002B3, $D114DD84, $EBC8E799, 
    $3F27EE02, $5A99320F, $D34E3A50, $D120E795, 
    $F9BDDDEE, $2E9C91AB, $918B885C, $F4F19DD1, 
    $DCA85D1A, $E023BD87, $FAACD3A8, $E7CB464D, 
    $F9A89786, $C2A491A3, $556F6834, $06905D09, 
    $C91AF932, $379D29FF, $6FB9D200, $96F19E05, 
    $A8632E1E, $D6AFE29B, $D727DD0C, $122A0541, 
    $3F98224A, $19FF5777, $A6D69558, $59FACEBD, 
    $7A7001B6, $EACA6493, $B67046E4, $D3E77679, 
    $AA4825EF, $36787DB0, $A6B1B875, $5845724E, 
    $92C3F78B, $05D805BC, $961590B1, $22979B7A, 
    $8CF97567, $4CA8EB08, $38C53B2D, $17CDDFE6, 
    $D5B07B83, $28427994, $84A533E9, $B54EAB92, 
    $0F9925DF, $74853D60, $ED4836E5, $C5E7AA7E, 
    $9D67D07B, $FE67026C, $90AB4021, $3179C8AA, 
    $60311757, $ABBED4B8, $2E318B9D, $BFE53216, 
    $3605D673, $64510044, $E3E09559, $BB3552C2, 
    $D4CF29CF, $C81B1110, $EDDC1955, $9D0CD6AE, 
    $DD6A6D6B, $FEDFD31C, $E4221391, $3351A9DA, 
    $43053D47, $2CF35268, $3286C00D, $E818F846, 
    $62B97563, $5946DAF4, $C6F09AC9, $18D32DF2, 
    $676931BF, $D0B4F8C0, $31D45FC5, $A8B7F6DE, 
    $D5DACE5B, $528D77CC, $B4F10B01, $3A723F0A, 
    $5D14E737, $92616418, $FC4BD87D, $BD0C3276, 
    $46FA5853, $DB0F09A4, $7D6C4439, $381B3D22, 
    $25263DAF, $DF0DF470, $B8D80A35, $032C0B0E, 
    $9607F34B, $D9CF2671, $D46E883A, $3E3F1527, 
    $A76409C8, $7047D4ED, $52A1E0A6, $52377F43, 
    $52D48C54, $412A91A9, $16408052, $4C054D9F, 
    $A5210420, $68CE18A5, $45EC133E, $A980DC3B, 
    $82F33D2C, $4BB365E1, $3A19856A, $CEA2C717, 
    $F0964378, $1181B55D, $D3FD02D6, $681FEA33, 
    $6F026304, $A6428319, $73B5F782, $EA45618F, 
    $E62927D0, $7DDD8B15, $B9BB0F6E, $0814892B, 
    $68815DDC, $95D4C951, $7F86369A, $3E9EFD07, 
    $5BD31128, $714079CD, $B3809906, $D0A29923, 
    $D3438DB4, $0B0B1889, $042EA2B2, $CE65797F, 
    $26A15F80, $FA6D6185, $869BFF9E, $05D1FA1B, 
    $12F0528C, $45AA50C1, $C4079BCA, $F6D2B6F7);

  cast_sbox6                : array[0..255] of DWord = (
    $774E2EC6, $52DD85E3, $267D2D74, $5F8A3749, 
    $2C853C72, $0D5D7A3F, $47DC6340, $2C837445, 
    $78B55D5E, $C2A7CEDB, $AAD07A4C, $0F8A1781, 
    $4DE17D8A, $0E7B1FB7, $82827E98, $929B5CFD, 
    $D0EBC8F6, $A7F248D3, $1BE8BC24, $95B6C0B9, 
    $FDC1ABA2, $4660662F, $C612BEF0, $0859FEB5, 
    $36C7D18E, $1E6CD3CB, $B3B552FC, $813D12F1, 
    $2B8626BA, $136F2DA7, $61F68448, $704E396D, 
    $C293D726, $F90B4FC3, $50799ED4, $E6EDEE29, 
    $F2C34ED2, $810D561F, $16AB2EA0, $326AED25, 
    $B78E39BE, $B1859CBB, $224CFFAC, $C4BE3261, 
    $8CC183EA, $FF24BF97, $AB421DF8, $2786F9DD, 
    $1D695956, $67D79AB3, $A89AD584, $F546BF99, 
    $11FD2602, $29A34A0F, $D2E0B250, $14DD3F95, 
    $29CB95EE, $F1C129AB, $FFA2805C, $B34475D1, 
    $0BA6951A, $9FFAD587, $62404BA8, $B78C9E4D, 
    $79CF4F86, $FA4629A3, $7DF76034, $AD183509, 
    $D5223132, $ECA141FF, $D52E4A00, $6017F605, 
    $1B82E61E, $312E7A9B, $A200D50C, $A846DD41, 
    $CD885A4A, $7C906F77, $240C0D58, $1DE626BD, 
    $6768B9B6, $8A85FC93, $4F7A3EE4, $B4F94E79, 
    $59257062, $A6C63DEF, $E94EF5B0, $7AC21075, 
    $A9F72A4E, $8E1C8F8B, $5CF2FDBC, $F17C68B1, 
    $B2F9D37A, $C3C48D67, $D7006308, $C65A932D, 
    $9D1897E6, $B7061383, $714E7194, $DDC10BE9, 
    $8E39E392, $55113DDF, $7C3DB560, $F1C28EE5, 
    $B1AB627E, $E31A687B, $3143FA6C, $3EDC1821, 
    $87CE00AA, $3CB62F57, $5AB84CB8, $FAF0E39D, 
    $2901EA16, $D2756E73, $BCDEF844, $92866D59, 
    $67D28AC2, $04C141CF, $4C358910, $E8407155, 
    $FE628EAE, $B6F7056B, $7CFECB1C, $129CEB91, 
    $3317E1DA, $36C45547, $380ECA68, $53F0180D, 
    $A087B046, $D3C30D63, $40D6D2F4, $48A072C9, 
    $0CA265F2, $C35549BF, $18B170C0, $87A2B7C5, 
    $7B1FAEDE, $2CC1665B, $AB6E6FCC, $3135E301, 
    $E72A770A, $798DFF37, $511EDC18, $27DF307D, 
    $504CEA76, $461DF053, $F12101A4, $EFA61C39, 
    $069C7522, $8E8C55AF, $526C6C70, $6F906235, 
    $6225C30E, $F3C88B4B, $E51DE87C, $115DFE71, 
    $5198C03A, $34F22D27, $914381C8, $FB852CED, 
    $6C3498A6, $38F51743, $56E88454, $616E69A9, 
    $72F3B852, $4465659F, $CB617C20, $25F070A5, 
    $6CF7CB3E, $379B743B, $BFD8352C, $4C0C3DE1, 
    $CB35BD6A, $F10FDF17, $9D17BB78, $F1E90D5D, 
    $3F61BAD6, $2FF78233, $40985B04, $D2105B19, 
    $321B2F82, $931F798F, $66CB9FD0, $86E9E315, 
    $0458C76E, $9009212B, $EEA855DC, $0C77A151, 
    $88146E9A, $7E461507, $82768928, $3C51D1CD, 
    $5C375106, $13143123, $71DB85B4, $3FE2F089, 
    $17C5DAB2, $E939917F, $C925D780, $34E3B985, 
    $704BB79E, $F120921B, $F1D94A8C, $801728C1, 
    $C787D3CA, $E533CEF7, $687AEAD8, $8A467A3D, 
    $CC585B36, $1E7A2413, $539D0464, $E37D29F9, 
    $1AE6B9E2, $6572AD6F, $082B2330, $0884F3F5, 
    $08139BCE, $9B30C70B, $C6F6133C, $46A1D431, 
    $0422ECFA, $56B80CE7, $3F7FE088, $798E06AD, 
    $40A7D966, $D2985B03, $A407D714, $9FB60769, 
    $85B0CD12, $C6C9CD5F, $5AD682E0, $80B49265, 
    $623373FE, $0AC8BFFB, $98C9AFEC, $E20EA3A1, 
    $23B8BA2A, $1BF1CED7, $71206A38, $062F771D, 
    $4148CB96, $E41DD5F3, $2686FDC4, $71A488D9, 
    $25971442, $5C7DF14F, $C962F690, $329994D5, 
    $846E402E, $E8B77CEB, $6F5F209C, $26949711, 
    $A75C3B5A, $864014C7, $903787E8, $FA71CB8D);

  cast_sbox7                : array[0..255] of DWord = (
    $8C4BBF48, $0E64606D, $7D1E9A26, $424D1EC3, 
    $257EA9D4, $E0F961D2, $A1E7B51F, $4BEB09A0, 
    $4C029CBE, $B2D78BBB, $E022AAAC, $FE168961, 
    $F05736EA, $B95D3E97, $67D898F8, $45E360DD, 
    $92535C56, $71F5A9B3, $D2ED2084, $8F8E3699, 
    $A6BE7902, $5835E90F, $4DB9CD50, $4506C695, 
    $BC3738EE, $65E758AB, $6C9D6B5C, $8D570CD1, 
    $9BDF881A, $66639487, $3CC806A8, $D09F454D, 
    $CD489286, $3A3078A3, $0646EB34, $B251EC09, 
    $699EC432, $A6DC20FF, $CB50A500, $BDAFBD05, 
    $6A15C91E, $8F18E99B, $D0D1000C, $4083B441, 
    $DD948D4A, $AF196E77, $BC350858, $101F0DBD, 
    $B1A13CB6, $392C8B93, $127709E4, $34954579, 
    $FA8D4362, $EE995CEF, $246A90B0, $B6381775, 
    $E6E14D4E, $90BB3E8B, $B44868BC, $09537FB1, 
    $CA09467A, $C65DCC67, $E07A9E08, $D429BA2D, 
    $EA405AE6, $D158E283, $1FA87C94, $0B2F42E9, 
    $FDBCF692, $B06C9CDF, $5A029060, $9F86D5E5, 
    $831CC57E, $895D577B, $6BCEA56C, $3BBD6F21, 
    $6110B3AA, $774FAE57, $9D33C7B8, $CAC64A9D, 
    $7948ED16, $19647D73, $DB464344, $C536E459, 
    $1AA0DDC2, $7D94E0CF, $BE53A410, $80C2F855, 
    $7E8B31AE, $43CE346B, $A96EB61C, $FDF88291, 
    $BDBDD4DA, $154E1447, $8F3B8568, $F03BBF0D, 
    $E81DF346, $CC3E5C63, $27FB5DF4, $FC0329C9, 
    $2BEBF8F2, $E79128BF, $A4D8CBC0, $67537EC5, 
    $382F91DE, $271CD55B, $2C739ACC, $B87BBA01, 
    $4663AA0A, $6BF7FE37, $ACACD718, $FF11177D, 
    $77626D76, $39157F53, $CDB2CCA4, $C32B1339, 
    $6F914822, $702074AF, $124D0770, $D6DF6935, 
    $5E4CE60E, $26983A4B, $7168537C, $85FE1571, 
    $DC95333A, $AF2C6C27, $F4E2BCC8, $E00D53ED, 
    $4EF95BA6, $3358E643, $29978F54, $1885A0A9, 
    $B6C3CB52, $7941C49F, $6CAB5720, $394DB7A5, 
    $1E662E3E, $B1CF633B, $6217E02C, $A37694E1, 
    $0D25706A, $6B0A5E17, $20783678, $1A37745D, 
    $AE05BDD6, $DE14A604, $5429D219, $95F68282, 
    $3534188F, $2B2EBAD0, $4EC56A15, $553E6A6E, 
    $A491502B, $058D40DC, $E01C3851, $4027619A, 
    $73F0D407, $51484428, $42D678CD, $1AEA9406, 
    $53208023, $82D510B4, $986EA789, $94DC6DB2, 
    $9676707F, $86523280, $9DAD8085, $BED89A9E, 
    $36ED011B, $3013758C, $0D65FFC1, $E8EE06CA, 
    $D67ECDF7, $C26DE5D8, $6D71613D, $934ADE36, 
    $24C2B313, $54C3CF64, $41EB20F9, $5E688CE2, 
    $3FC7CC6F, $27D0BE30, $E2ACFAF5, $2677BECE, 
    $ED31760B, $33357E3C, $6F0AEB31, $B60C5FFA, 
    $C7934BE7, $78441B88, $9BCF2DAD, $BC099C66, 
    $BC0D2A03, $E60BE214, $57763E69, $F0CDE012, 
    $74272C5F, $DAA55DE0, $80AAD965, $969ED6FE, 
    $87EDAEFB, $8DBE5AEC, $2B01FAA1, $C1556D2A, 
    $944D4DD7, $F065E538, $2DF6DE1D, $1149CE96, 
    $91AEE4F3, $CE1848C4, $FA26FFD9, $CD7F6742, 
    $06D3904F, $3B0B1190, $F0CE1BD5, $8910E32E, 
    $F3F0ABEB, $9BB90B9C, $B9822E11, $BFDC2E5A, 
    $920BD3C7, $D1AE42E8, $522F728D, $166E74C6, 
    $4296E3E3, $59940374, $D5546549, $29302272, 
    $4B4BF83F, $667CD940, $327DC245, $16D0E35E, 
    $3A496CDB, $4670904C, $55028581, $31F3A38A, 
    $0E6DDDB7, $9C383498, $74FFEAFD, $861A8EF6, 
    $7FF426D3, $3A6A1224, $8E956EB9, $1BD311A2, 
    $054F642F, $ABB5B4F0, $3B60CCB5, $2821D78E, 
    $7046F1CB, $B46FE8FC, $6A3A00F1, $932ECCBA, 
    $3F526BA7, $595EBA48, $B12F476D, $82311D26);

  cast_sbox8                : array[0..255] of DWord = (
    $F08DF75C, $8939C8D1, $503D341A, $98E7F087, 
    $58CDD2A8, $B9EC414D, $EDB97E86, $761514A3, 
    $F22DF734, $D0052809, $490EF032, $3ABCFCFF, 
    $8024F100, $1D053905, $3AB1351E, $25D2059B, 
    $14DE8C0C, $F0F77041, $DCC7394A, $2BC6CA77, 
    $6F07D458, $9F6D09BD, $941728B6, $D32A2793, 
    $B8DB15E4, $6AB98179, $98326F62, $8D8338EF, 
    $B46BDCB0, $916E9375, $26E1B94E, $686D5A8B, 
    $A132F4BC, $FA183BB1, $CED0F27A, $32F42867, 
    $66DA6A08, $3938B62D, $7D7B46E6, $732F7E83, 
    $D1498894, $ED847EE9, $3C572292, $C81F78DF, 
    $E9F0DC60, $AE5E51E5, $C942317E, $93C8737B, 
    $BA56316C, $08932B21, $762D5FAA, $098F0A57, 
    $03E093B8, $4556469D, $FC08D916, $FCD41973, 
    $B8E44F44, $F77D2059, $2CF009C2, $0BD0BCCF, 
    $42EEF010, $8AFB7455, $B1959DAE, $E253421C, 
    $529F3E91, $3DEF80DA, $92F67047, $B2F55168, 
    $D00CBB0D, $E922DF46, $BB06F863, $225669F4, 
    $31FA65C9, $94B024F2, $7A1604BF, $E2E117C0, 
    $44ACFAC5, $8EDEFDDE, $AC39F15B, $A87526CC, 
    $50B37601, $DC6A560A, $2AC95A37, $3A33A318, 
    $A3E3137D, $D56C5976, $8CF71B53, $A58AD8A4, 
    $C0934F39, $24AE50AF, $9E825370, $6F19E535, 
    $5F61520E, $13AE564B, $5946DF7C, $2D86D171, 
    $8330DF3A, $94E6C827, $68F688C8, $B9A04FED, 
    $38C847A6, $D6138243, $6FAC9B54, $B11EDCA9, 
    $94B1F752, $FD98A09F, $ABCDA320, $842933A5, 
    $A09F9A3E, $389E7F3B, $AE936C2C, $361050E1, 
    $0F161C6A, $ED6DBA17, $C7D90278, $A84B705D, 
    $A259A9D6, $6E0B2D33, $F326B204, $6BB40E19, 
    $3299AE82, $C713F48F, $51FE06D0, $5401E615, 
    $7F5CD66E, $86D96C2B, $7F65CCDC, $4986F451, 
    $382D0D9A, $98BD3007, $48B61028, $152B74CD, 
    $E8838006, $90CD1C23, $97A41CB4, $22A9E389, 
    $B2F499B2, $039F4C7F, $998E7E80, $750AFC85, 
    $079C069E, $C66E1D1B, $7009018C, $4961BBC1, 
    $C1C8B2CA, $337429F7, $F6A8B1D8, $23C75D3D, 
    $58E8CA36, $CE884F13, $6A0FDB64, $42975CF9, 
    $10B5B8E2, $E5F9A86F, $FC3A0A30, $B3EB76F5, 
    $54A02ACE, $0BAB920B, $A2080A3C, $8957A731, 
    $AA7C0BFA, $8271A7E7, $A60BE788, $E5E629AD, 
    $E86C8866, $FBABC603, $CC94EE14, $E2537A69, 
    $9A100C12, $4122085F, $14FBA9E0, $838A5565, 
    $C0EC42FE, $A720CAFB, $642DE6EC, $3F5FB6A1, 
    $5C1A192A, $62D4A9D7, $A47AB138, $CB8EDA1D, 
    $6331BA96, $20E680F3, $269E54C4, $32F53BD9, 
    $20769342, $78576C4F, $500E5D90, $6D0E97D5, 
    $16434F2E, $159CC7EB, $E285979C, $F3B0EA11, 
    $DBB5DA5A, $B9FC2FC7, $68D00EE8, $13086E8D, 
    $9C9B60C6, $6B277FE3, $94D70F74, $EFD3A149, 
    $289C4E72, $6F18D43F, $9AED2540, $7FDF3E45, 
    $BDA84F5E, $F02E88DB, $D65A1C4C, $F0C24181, 
    $F9A24F8A, $658739B7, $43270098, $38D9E6FD, 
    $9F4C7AF6, $1B9DC2D3, $992A1E24, $CE85AAB9, 
    $1A743DA2, $7925402F, $145300F0, $C1A348B5, 
    $EF5E438E, $DC250DCB, $363674FC, $B34ABCF1, 
    $817278BA, $2B54C7A7, $0CDA8648, $67CA436D, 
    $DD280926, $77B849C3, $CAC280D4, $EEE25829, 
    $713160D2, $4A7BB01F, $BC3AF0A0, $9E41B725, 
    $E2E82BBE, $7B0F56BB, $E5E5A1AC, $5A415C61, 
    $69F955EA, $A983D997, $D8859FF8, $E8E083DD, 
    $5F510B56, $B92614B3, $860B3784, $4B00A999, 
    $EB46B802, $E75B240F, $23DFF450, $57E18995, 
    $FF0907EE, $5ABC63AB, $6672A25C, $16DD1FD1);

